/* 
 * File:   Manager.h
 */

#ifndef MANAGER_H
#define	MANAGER_H

#include <vector>
#include <string>
#include <string.h>

#include "Account.h"
#include "RemoteSource.h"
#include "File.h"
#include "Log.h"
#include "LocalSource.h"

class Manager {
public:


    void doRecSenSyn(int what);
    std::vector<File> doRView();
    std::vector<File> doLView();
    void doRDelete();
    void doLDelete();
    void doRClear();
    void doLClear();

    Manager(Account& account_) : account(account_), remote_source(account_.receive_adress, account_.sending_adress),
    local_source(account_.local_adress, account_.if_archive_flag, account_.if_synch, account.synch)
    {
       /* if (account_.if_synch)
            cout << "Account.if_synch" << endl;
        else
            cout << "shit" << endl; */
    };

private:

    void strategyReceive(std::vector<File>& local_files_, std::vector<File>& remote_files_);
    void strategySend(std::vector<File>& local_files_, std::vector<File>& remote_files_);
    void strategySynch(std::vector<File>& local_files_, std::vector<File>& remote_files_);

    Account& account;
    RemoteSource remote_source;
    LocalSource local_source;
};

#endif	/* MANAGER_H */

